package com.chanta.server.persistence;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * TODO Please comment this class..
 * 
 * @author Hakan Özdemir - Vendoo Inc.
 * @date 02.11.2013
 * 
 */
@PersistenceCapable
public class Wishlist {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent(mappedBy = "wishlist")
	private User user;

	@Persistent(mappedBy = "wishlist")
	private List<WishlistElement> wishlistElements;

	/**
	 * Getter for user.
	 * 
	 * @return user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * Setter for user.
	 * 
	 * @param user
	 *            the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * Getter for wishlistElements.
	 * 
	 * @return wishlistElements
	 */
	public List<WishlistElement> getWishlistElements() {
		return wishlistElements;
	}

	/**
	 * Setter for wishlistElements.
	 * 
	 * @param wishlistElements
	 *            the wishlistElements to set
	 */
	public void setWishlistElements(List<WishlistElement> wishlistElements) {
		this.wishlistElements = wishlistElements;
	}
}
